<template>
  <single-header-skeleton :items="items"></single-header-skeleton>
</template>

<script>
import SingleHeaderSkeleton from "../../components/single-header/SingleHeaderSkeleton.vue";
import {adminNavItems, normalNavItems} from "./skeletons-data";

export default {
  name: "MainSkeleton",
  components: {SingleHeaderSkeleton},
  data() {
    return {
      items: this.$store.state.user.user_type === 'admin' ? adminNavItems : normalNavItems,
    }
  },
  watch: {
    '$store.state.user.user_type': function (newVal, oldVal) {
      this.items = newVal === 'admin' ? adminNavItems : normalNavItems;
    }
  }
}
</script>

<style scoped>

</style>